<?php
  //global $customer_id;
  require('includes/application_top.php');
  require('includes/classes/http_client.php');

  $breadcrumb->add('Trợ giúp', tep_href_link('helps.php', '', 'SSL'));   
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
    <title><?php echo TITLE; ?></title>
    <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">         
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
  <tr>
    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
    </table></td>
<!-- body_text //-->
    <td width="100%" valign="top" align="left">   
    <table border="0" cellpadding="4" cellspacing="4" width="100%">
    <div class="home-newprodbar">
                    <div class="lblTitle">Hướng dẫn - Trợ giúp</div>
                </div><br /><br /><br /> 
        <!--<tr><td class="title_orders" colspan="2" style="padding-left: 15px;">Danh sách các trợ giúp</td></tr>-->
        <tr><td align="left">
        <?php
            $helps_query = tep_db_query("select count(*) as total from helps");
            $helps_total = tep_db_fetch_array($helps_query);
            if ($helps_total > 0) {
                $helps_query_raw = "select * from helps order by title ";
                $helps_split = new splitPageResults($helps_query_raw, MAX_DISPLAY_PAGE_LINKS);
                $helps_query = tep_db_query($helps_split->sql_query);
                $count = 0;
                while ($helps = tep_db_fetch_array($helps_query)) {
                    $count++;
        ?>
                  <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
                    <tr class="infoBoxContents">
                      <td class="main" valign="top" style="color: #2ba7fa;"><?php echo $count.'. <a href="helps_detail.php?hid='.$helps['id'].'" class="helps_link">'.$helps['title'].'</a>' ?></td>
                    </tr>
                  </table>
            <?php
                }
            }
            ?>
        </td></tr>        
        <?php
          if ($helps_total > 0) {
        ?>
                <tr><td>
                    <div class="pagecount">
                        <div class="pagenum"><?php //echo $helps_split->display_count(TEXT_DISPLAY_NUMBER_OF_ORDERS_PRODUCT); ?></div>
                        <ul class="pagelist">
                            <?php echo $helps_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?>
                        </ul>
                    </div>
                </td></tr>
        <?php
          }
        ?>     
    </table>
</td>
<!-- body_text_eof //-->
    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
    </table></td>
  </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
